<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var a=prompt(" 请输入年龄");
    if (a>=18){
        document.write("<img src='QQ图片20190627223950.jpg'>")
    }else {
        alert("用户年龄太小")
    }
</script>
</body>
</html>